<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<body layout:fragment="modal">
<label>
        <input type="checkbox" th:field="*{featureMap[__${feature.id}__].value}" />
        <span th:text="${feature.name}">label</span>
</label>
<ul th:if="${not #lists.isEmpty(feature.features)}">
    <li th:each="subft : ${feature.features}">
        <div layout:include="includes_feature :: modal" th:with="feature=${subft}" th:remove="tag">
        </div>
    </li>
</ul>
</body>
</html>